package com.jms.framework.jdbc.transaction.utils;

import com.jms.framework.jdbc.transaction.annotation.Transaction;

import java.lang.reflect.Method;

public class TransactionUtils {

    public static boolean haveTransaction(Class<?> clazz) {
        Method[] methods = clazz.getMethods();
        for (Method method : methods) {
            if (method.isAnnotationPresent(Transaction.class)) {
                return true;
            }
        }
        return false;
    }
}
